

<?php
    $cnt = count($results);
    for ($i = 0; $i < $cnt; $i++):

        $trans_name = $results[$i]->city_from;

        if ($results[$i]->city_from_type === 'Airport')
            $trans_name.= ' Airport';

        $trans_name.= '<span> (' . $results[$i]->country_from_ID . ')</span> - ';

        $trans_name .= $results[$i]->city_to;

        if ($results[$i]->city_to_type === 'Airport')
            $trans_name.= ' Airport';

        $trans_name.= '<span> (' . $results[$i]->country_to_ID . ')</span>';

        if (isset($_GET['return_transfer'])):

            $trans_name.= ' - ' . $results[$i]->city_from;

            if ($results[$i]->city_from_type === 'Airport')
                $trans_name.= ' Airport';

            $trans_name.= '<span> (' . $results[$i]->country_from_ID . ')</span>';

        endif;

        $href = lang_url('transfers/reservation?transfer_id=' . $results[$i]->ID . '&' . http_build_query($_GET));
        $thumbnail = HOST_URL_HOTELS . $results[$i]->path . '/thumb_182x123/' . $results[$i]->filename;
        ?>
        <li class="js_item excursions_box" id="box-<?= $results[$i]->ID ?>" style="display: block">

            <div class="box clearfix gradient5">

                <div class="white_line"></div>

                <h2 class="exc_box_title"><a href="<?= $href ?>"><?= $trans_name ?></a></h2>


                <div id="myCarousel<?= $i ?>" class="carousel slide" data-interval="false">

                    <!-- Carousel items -->
                    <div class="carousel-inner">

                        <div class="item active">
                            <a href="<?= $href ?>">
                                <img src="<?= $thumbnail ?>">
                            </a>
                        </div>
                    </div>

                </div>

                <div class="details">

                    <ul>
                        <li><strong><?= ucfirst(lang('departure')) ?>:</strong> <?= $results[$i]->city_from_type === 'Airport' ? $results[$i]->city_from . ' / Airport' : $results[$i]->city_from; ?></li>
                        <li><strong><?= ucfirst(lang('arrival')) ?>:</strong> <?= $results[$i]->city_to_type === 'Airport' ? $results[$i]->city_to . ' / Airport' : $results[$i]->city_to; ?></li>
                        <li><strong><?= lang('dtl.num_of_persons') ?>:</strong> 1 - <?= $results[$i]->car_max_ps ?></li>
                        <li><strong><?= lang('vehicle') ?>:</strong> <?= $results[$i]->car_name ?></li>
                    </ul>

                    <div class="realtime-exc realtime">

                        <div class="result-price"><span class="from"><?= lang('price_per_transfer') ?>:</span> <?= !isset($_GET['return_transfer']) ? $results[$i]->price : $results[$i]->return_price; ?> &euro;</div>

                        <a class="" href="<?= $href ?>"><?= lang('res.book_now'); ?></a>
                    </div>
                </div>

            </div>

        </li>

    <?php endfor; ?>